Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace "os.getlogin()" with "pwd.getpwuid(os.getuid())" #33

Merged
merged 1 commit into from Jun 1, 2015
Merged

replace "os.getlogin()" with "pwd.getpwuid(os.getuid())" #33

merged 1 commit into from Jun 1, 2015

Commits on Jun 1, 2015

  1. replace "os.getlogin()" with "pwd.getpwuid(os.getuid())"

    Hello everyone,
    
    I am setting up Open IO in Docker. In the process, I notice that using `os.getlogin()` does not work if the user that executes the program is not logged in via the `login` command. More generally, it seems like `getlogin()` is not too reliable and `getpwuid(getuid())` seems to be a better way to do the same thing: http://stackoverflow.com/questions/4785126/getlogin-c-function-returns-null-and-error-no-such-file-or-directory
    
    Best regards,
    Conrad
    conradkleinespel committed Jun 1, 2015